package com.kingdee.eas.fdc.customerservice.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.fdc.propertymgmt.PPMBillCollection;
import com.kingdee.eas.fdc.customerservice.SerivceProcessBillStatusEnum;
import com.kingdee.eas.fdc.customerservice.ServiceProcessBillInfo;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.fdc.customerservice.ServiceProcessBillCollection;
import com.kingdee.eas.framework.CoreBillBaseCollection;
import com.kingdee.eas.framework.CoreBaseInfo;
import java.util.Collection;
import com.kingdee.eas.fdc.propertymgmt.PPMProjectBillCollection;
import com.kingdee.eas.fdc.basedata.FDCBillCollection;
import com.kingdee.eas.framework.ObjectBaseCollection;
import com.kingdee.eas.fdc.propertymgmt.app.PPMProjectBillControllerBean;



public abstract class AbstractServiceProcessBillControllerBean extends PPMProjectBillControllerBean implements ServiceProcessBillController
{
    protected AbstractServiceProcessBillControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("CAF65093");
    }

    public ServiceProcessBillInfo getServiceProcessBillInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("fb85d787-afe4-4527-a239-2c5ed7cbd0b5"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            ServiceProcessBillInfo retValue = (ServiceProcessBillInfo)_getValue(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk);
    }

    public ServiceProcessBillInfo getServiceProcessBillInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b86f05e8-ef86-4a61-8ef7-66b78545e823"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            ServiceProcessBillInfo retValue = (ServiceProcessBillInfo)_getValue(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk, selector);
    }

    public ServiceProcessBillInfo getServiceProcessBillInfo(Context ctx, String oql) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7903de1c-c02a-45c9-9793-8fec4bf44ce1"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            ServiceProcessBillInfo retValue = (ServiceProcessBillInfo)_getValue(ctx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, String oql) throws BOSException, EASBizException
    {
        return super._getValue(ctx, oql);
    }

    public ServiceProcessBillCollection getServiceProcessBillCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e1f31f78-47e4-40b6-b61e-418fe45e5ad3"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            ServiceProcessBillCollection retValue = (ServiceProcessBillCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public ServiceProcessBillCollection getServiceProcessBillCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("2f6767d4-c8ca-4660-aab7-3a7eb7d9ec05"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            ServiceProcessBillCollection retValue = (ServiceProcessBillCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public ServiceProcessBillCollection getServiceProcessBillCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("22a1d278-8229-4467-b72c-f5596f1097ff"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            ServiceProcessBillCollection retValue = (ServiceProcessBillCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public void updateProcessBillStatus(Context ctx, ServiceProcessBillInfo vo, SerivceProcessBillStatusEnum billStatus) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d302ac92-41fa-4024-a9a2-6a42ae170dd4"), new Object[]{ctx, vo, billStatus});
            invokeServiceBefore(svcCtx);
            _updateProcessBillStatus(ctx, vo, billStatus);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateProcessBillStatus(Context ctx, ServiceProcessBillInfo vo, SerivceProcessBillStatusEnum billStatus) throws BOSException, EASBizException;

    public Collection findProcessEntryInfoById(Context ctx, ServiceProcessBillInfo processBillInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534f4b60-64b4-4bee-980c-00458425ee36"), new Object[]{ctx, processBillInfo});
            invokeServiceBefore(svcCtx);
            Collection retValue = (Collection)_findProcessEntryInfoById(ctx, processBillInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Collection _findProcessEntryInfoById(Context ctx, ServiceProcessBillInfo processBillInfo) throws BOSException, EASBizException;

    public PPMProjectBillCollection getPPMProjectBillCollection (Context ctx) throws BOSException
    {
    	return (PPMProjectBillCollection)(getServiceProcessBillCollection(ctx).cast(PPMProjectBillCollection.class));
    }
    public PPMProjectBillCollection getPPMProjectBillCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (PPMProjectBillCollection)(getServiceProcessBillCollection(ctx, view).cast(PPMProjectBillCollection.class));
    }
    public PPMProjectBillCollection getPPMProjectBillCollection (Context ctx, String oql) throws BOSException
    {
    	return (PPMProjectBillCollection)(getServiceProcessBillCollection(ctx, oql).cast(PPMProjectBillCollection.class));
    }
    public PPMBillCollection getPPMBillCollection (Context ctx) throws BOSException
    {
    	return (PPMBillCollection)(getServiceProcessBillCollection(ctx).cast(PPMBillCollection.class));
    }
    public PPMBillCollection getPPMBillCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (PPMBillCollection)(getServiceProcessBillCollection(ctx, view).cast(PPMBillCollection.class));
    }
    public PPMBillCollection getPPMBillCollection (Context ctx, String oql) throws BOSException
    {
    	return (PPMBillCollection)(getServiceProcessBillCollection(ctx, oql).cast(PPMBillCollection.class));
    }
    public FDCBillCollection getFDCBillCollection (Context ctx) throws BOSException
    {
    	return (FDCBillCollection)(getServiceProcessBillCollection(ctx).cast(FDCBillCollection.class));
    }
    public FDCBillCollection getFDCBillCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (FDCBillCollection)(getServiceProcessBillCollection(ctx, view).cast(FDCBillCollection.class));
    }
    public FDCBillCollection getFDCBillCollection (Context ctx, String oql) throws BOSException
    {
    	return (FDCBillCollection)(getServiceProcessBillCollection(ctx, oql).cast(FDCBillCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBillBaseCollection)(getServiceProcessBillCollection(ctx).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBillBaseCollection)(getServiceProcessBillCollection(ctx, view).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBillBaseCollection)(getServiceProcessBillCollection(ctx, oql).cast(CoreBillBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx) throws BOSException
    {
    	return (ObjectBaseCollection)(getServiceProcessBillCollection(ctx).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (ObjectBaseCollection)(getServiceProcessBillCollection(ctx, view).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (ObjectBaseCollection)(getServiceProcessBillCollection(ctx, oql).cast(ObjectBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getServiceProcessBillCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getServiceProcessBillCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getServiceProcessBillCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}